<% @page_title = "最新灾情 | 多背一公斤 - 灾后学校重建计划" -%>

<% content_for :sidebar do -%>
  <%= link_to image_tag("/images/new_camp.gif"), new_camp_schools_url, :class=> "img" %>
  <h2 class="pink">地震灾区 &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp;</h2>
  <%= render :partial => "/shared/disasters" %>

<% end -%>


<h1>最新受灾学校信息 <span class="h1sub"><%= link_to "更多学校照片", photos_schools_url %> | 
<%= link_to "更多学校消息", comments_schools_url %></span></h1>

<p style="text-align:center; font-size:16.8px; line-height:32px">
  <span style="font-weight:bold;font-size:24px; color:red">16</span>个受灾地区<br />
  <span style="font-weight:bold;font-size:24px; color:red">2000</span>多所中小学校<br />
  请发布你知道的学校消息或照片
</p>

<h2>全部消息 &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp;(<%= link_to "更多消息", comments_schools_url, :class => 'h2l' %>)</h2>
<div class="uml">
  <ul class="mbt">
    <% @comments.each do |cmt| -%>
    <li class="mbtl"><%= avatar_for cmt.user, "large" %></li>
    <li class="mbtrdot">
      <%= link_to cmt.user.login, user_path(cmt.user.id) %> <span class="tip"><%= cmt.created_at.to_date %>写了关于<%= link_to cmt.school.title, school_url(cmt.school.id) %>的消息</span>
      <%= simple_format truncate(cmt.content, 60) %>
    </li>
    <% end -%>
  </ul>
</div>

<h2>学校照片 &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp;(<%= link_to "更多照片", photos_schools_url, :class => "h2l" %>)</h2>
<% @photos.each do |photo| -%>
  <dl class="obp">
    <dt><%= link_to image_tag(photo.public_filename(:small), :style=> "float:left; margin:3px"), school_url(photo.school.id) %></dt>
    <dd><%= link_to photo.school.title, school_url(photo.school.id) %>&nbsp;&nbsp;<span class="tip">上传于<%=  photo.created_at.to_date %></span>
    </dd>
  </dl>
<% end -%>
<div class="clear"></div>

